Skip to content

fix: bind the MJPEG server to the USE_IP address - #1299

Merged
KazuCocoa merged 1 commit into
appium:masterfrom
Finalthief:mjpeg-bind-use-ip
Oct 16, 2026
Merged

KazuCocoa merged 1 commit into
appium:masterfrom
Finalthief:mjpeg-bind-use-ip

Conversation

@Finalthief

Copy link
Copy Markdown

USE_IP (FBConfiguration.bindingIPAddress) restricts the HTTP server to one address through setInterface:, but the MJPEG screenshots broadcaster never sets FBTCPSocket.interface, so it always listens on every interface. With USE_IP=127.0.0.1, for example when the host reaches WDA through usbmux port forwarding, port 8100 is loopback-only as expected, but the MJPEG stream on 9100 stays reachable from the device's Wi-Fi network by anyone on the same LAN.

This change applies the same binding address to the broadcaster. When USE_IP is not set, interface stays nil and the listener is created exactly as before (nw_listener_create_with_port), so the default behaviour does not change.

Tested on an iPhone 16 Pro running iOS 26.6.2, with a real-device build of this change (Xcode 16.4, Scripts/ci/build-real.sh), started with USE_IP=127.0.0.1. Connections to <device Wi-Fi IP>:9100 are refused, and the MJPEG stream still works over usbmux on the device's loopback. Before the change, the same setup accepted connections on <device Wi-Fi IP>:9100.

🤖 Generated with Claude Code

USE_IP (FBConfiguration.bindingIPAddress) restricts the HTTP server to one
address via setInterface:, but the MJPEG screenshots broadcaster never set
FBTCPSocket.interface, so it always listened on every interface. Apply the
same binding address to the broadcaster. When USE_IP is not set the
interface stays nil and behaviour is unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@linux-foundation-easycla

linux-foundation-easycla Bot commented Oct 14, 2026 •

Copy link
Copy Markdown

CLA Signed
The committers listed above are authorized under a signed CLA.

  • ✅ login: Finalthief / name: Finalthief (496a944)

@KazuCocoa
KazuCocoa merged commit 53573cf into appium:master Oct 16, 2026
56 of 57 checks passed
github-actions Bot pushed a commit that referenced this pull request Oct 16, 2026
## [16.15.3](v16.15.2...v16.15.3) (2026-10-16)

### Bug Fixes

* bind the MJPEG server to the USE_IP address ([#1299](#1299)) ([53573cf](53573cf))
@github-actions

Copy link
Copy Markdown

🎉 This PR is included in version 16.15.3 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants